import sys
import win32com.client 

shell = win32com.client.Dispatch("WScript.Shell")
shortcut = shell.CreateShortCut("test.lnk")
shortcut.Targetpath = "main2.py"
shortcut.save()